package cn.edu.scau.cmi.zhangjunming.adapter;

import java.util.ArrayList;
import java.util.List;

public class ObjectAdapter implements Target{
    
	public List<Integer> intList;
    public List<Student> stuList;
	
    public ObjectAdapter() {
    	intList = new ArrayList<Integer>();
        stuList = new ArrayList<Student>();
	}
    
    public List<Student> sortStudent(List<Integer> intL,List<Student> stuL) {
    	stuList.clear();
        SortUtil su = new SortUtil();
		intList =new ArrayList<Integer>(su.sortInt(intL));
		for(int i=0;i<intL.size();i++) {
			for(int j=0;j<stuL.size();j++) {
				if(stuL.get(j).getNum()==intL.get(i)) {
					stuList.add(stuL.get(j));
					break;
				}
			}
		}
		return stuList;
	}
    
    
	public List sortInt(List<Integer> intList) {
		
		return null;
	}
    
}
